package com.google.code.contactserv;
/*
 * Copyright 2007 The semap project development team.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * Created by myn at 06.08.2007 12:40:20.
 *
 * ContactServ Exception class and exit codes.
 *
 * $Id$
 */

public class ContactServException extends Exception {

    private static final long serialVersionUID = -3933187628114492958L;

	// FIXME Don't use error codes, create separated exception classes instead
	public static final int OK                      = 0;
    public static final int UNKNOWN_CMD             = 1;
    public static final int UNKNOWN_CMD_ARG         = 2;
    public static final int WRONG_ARG_VALUE         = 3;
    public static final int RDF_FILE_DOESNOT_EXIST  = 4;
    public static final int WRONG_INPUT_FILE_FORMAT = 5;

    private int rc = OK;

    public ContactServException(int ret, String message) {
        super(message);
        rc = ret;
    }

    public int getRetCode() {
    	return rc;
    }
}
